/* 文章页面布局 */
.article-container {
    display: flex;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    gap: 30px;
}

.article-content {
    flex: 3;
}

.article-sidebar {
    flex: 1;
}

/* 文章头部样式 */
.article-header {
    margin-bottom: 30px;
}

.article-header h1 {
    font-size: 2.2rem;
    color: #2d3748;
    margin-bottom: 15px;
    line-height: 1.3;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    color: #718096;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

/* 文章内容样式 */
.article-featured-image {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
}

.article-featured-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-featured-image img:hover {
    transform: scale(1.02);
}

.article-body {
    color: #4a5568;
    line-height: 1.8;
    font-size: 1.05rem;
}

.article-body p {
    margin-bottom: 20px;
}

.article-body h3 {
    color: #2d3748;
    margin: 30px 0 15px;
    font-size: 1.5rem;
}

.article-body ul, .article-body ol {
    margin: 0 0 20px 20px;
    padding-left: 20px;
}

.article-body ul {
    list-style-type: disc;
}

.article-body ol {
    list-style-type: decimal;
}

.article-body li {
    margin-bottom: 10px;
}

.article-body blockquote {
    border-left: 4px solid #3182ce;
    padding: 15px 20px;
    margin: 25px 0;
    background-color: #edf2f7;
    font-style: italic;
    color: #4a5568;
}

.article-image {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 20px 0;
}

/* 作者信息样式 */
.article-author {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background-color: #f7fafc;
    border-radius: 8px;
    margin: 40px 0;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h4 {
    font-size: 1.1rem;
    color: #2d3748;
    margin-bottom: 5px;
}

.author-info p {
    color: #718096;
    margin: 0;
}

/* 分享按钮样式 */
.article-share {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.article-share span {
    color: #4a5568;
}

.share-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background-color: #e2e8f0;
    color: #2d3748;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.share-button:hover {
    background-color: #3182ce;
    color: white;
}

/* 侧边栏样式 */
.sidebar-section {
    background-color: #f7fafc;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.sidebar-section h3 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1.2rem;
    padding-bottom: 10px;
    border-bottom: 2px solid #3182ce;
}

.related-posts {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.related-post {
    display: flex;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease;
}

.related-post:hover {
    transform: translateX(5px);
}

.related-post img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.related-post-info h4 {
    font-size: 0.95rem;
    color: #2d3748;
    margin-bottom: 5px;
    line-height: 1.3;
}

.related-post-info span {
    font-size: 0.8rem;
    color: #718096;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cloud-tag {
    text-decoration: none;
    background-color: #e2e8f0;
    color: #4a5568;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.cloud-tag:hover {
    background-color: #3182ce;
    color: white;
}

/* 评论区样式 */
.comments-section {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
}

.comments-section h3 {
    font-size: 1.8rem;
    color: #2d3748;
    margin-bottom: 30px;
}

.comment-form {
    background-color: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 40px;
}

.comment-form h4 {
    margin-bottom: 15px;
    color: #2d3748;
}

.comment-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 15px;
}

.submit-comment {
    background-color: #3182ce;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s ease;
}

.submit-comment:hover {
    background-color: #2b6cb0;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 30px;
}

.comment {
    display: flex;
    gap: 15px;
}

.comment-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.comment-author {
    font-weight: 600;
    color: #2d3748;
}

.author-badge {
    display: inline-block;
    background-color: #3182ce;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 5px;
}

.comment-date {
    color: #718096;
    font-size: 0.85rem;
}

.comment-content p {
    color: #4a5568;
    line-height: 1.6;
}

.reply-button {
    color: #3182ce;
    background: none;
    border: none;
    padding: 5px 0;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.reply-button:hover {
    color: #2b6cb0;
    text-decoration: underline;
}

.comment.reply {
    margin-left: 30px;
    padding-left: 15px;
    border-left: 2px solid #e2e8f0;
}

.load-more-comments {
    display: block;
    margin: 0 auto;
    background-color: transparent;
    color: #3182ce;
    border: 1px solid #3182ce;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.load-more-comments:hover {
    background-color: #3182ce;
    color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .article-container {
        flex-direction: column;
    }

    .article-header h1 {
        font-size: 1.8rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 8px;
    }

    .comment {
        flex-direction: column;
        align-items: flex-start;
    }

    .comment.reply {
        margin-left: 15px;
    }
}
